from sqlalchemy import Column, BIGINT, String

from web import Base
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema

class User(Base):

    __tablename__ = 'user'

    id = Column(BIGINT, primary_key=True,autoincrement= True)

    username = Column(String(50))

    password =  Column(String(50))

    nickname =  Column(String(50))

class UserSchema(SQLAlchemyAutoSchema):
    class Meta:
        model = User
        load_instance = True
# 主要用于响应User的json数据
userSchema = UserSchema()




